
#ifndef __LIBERTY_LIBRARY_ASSETIMPORTER_H__
#define __LIBERTY_LIBRARY_ASSETIMPORTER_H__

#include <Liberty3D/Library/MappedAsset.h>

namespace Liberty { namespace Library {
    /**
     * The AssetImporter class contains information, specified by the games programmer, about
     * how this asset should be used in the game.
     *
     * It should not contain any information about the asset itself because this information
     * should be stored inside the AssetCachedData object.
     */
    class AssetImporter : public MappedAsset {
    protected:
        std::string _userData;

    public:
        AssetImporter();
        virtual ~AssetImporter();

        std::string userData() const;
        void setUserData(const std::string& userData);

        virtual std::string                     generateBuildTag (const std::shared_ptr<AssetCachedData>& cachedData);
        virtual std::shared_ptr<AssetBuildData> generateBuildData(const std::shared_ptr<AssetCachedData>& cachedData, const std::string& buildTag, const std::shared_ptr<IAssetContext>& contextForBuildData);

   public:
        // Object
        virtual std::string name() const;
        virtual void setName(const std::string& name);

    public:
        // ISerializable
        virtual void serializeObject(Liberty::Engine::ISerializer*);
        virtual const char* serializeClassName() const;
        virtual void serializeEnd(Liberty::Engine::ISerializer*);

    public:
        static const char* classNameForExtension(const char* extension);
    };
}}

#endif
